package com.oim.function.ui.device;

import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;

public class ItemInfoPanel extends VBox {

	private Label nameLabel = new Label();
	private Label countLabel = new Label();
	private Label useLabel = new Label("使用率:");
	private Label useRateLabel = new Label();

	HBox hBox = new HBox();
	VBox vBox = new VBox();

	public ItemInfoPanel() {
		initComponent();
		initEvent();
	}

	private void initComponent() {
		this.setSpacing(5);
		this.setMinHeight(50);
		this.setStyle("-fx-background-color:rgba(138, 198, 217, 1)");
		this.getChildren().add(hBox);
		this.getChildren().add(vBox);
		hBox.getChildren().add(nameLabel);
		hBox.getChildren().add(countLabel);
		hBox.getChildren().add(useLabel);
		hBox.getChildren().add(useRateLabel);
		// nameLabel.setStyle("-fx-text-fill:rgba(255, 255, 255, 1)");

	}

	private void initEvent() {
		// TODO Auto-generated method stub

	}

	public void setName(String name) {
		nameLabel.setText(name);
	}

	public void setCount(String count) {
		countLabel.setText(count);
	}

	public void setUseRate(String useRate) {
		useRateLabel.setText(useRate);
	}
}
